package com.ct.controller;

import cn.hutool.core.lang.Console;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * 测试Controller
 */
@RestController
@RequestMapping("/test")
@Slf4j
public class TestController {

    @Autowired
    private HttpServletRequest request;




    /**
     * 测试层
     */
    @GetMapping("/to")
    public String test() {
        Console.log("requestURI:{}", request.getRequestURI());
        log.info("requestURI:{}", request.getRequestURI());
        return "success";
    }
}
